<h1>Listing payments</h1>

<table>
  <tr>
    <th>Commerce</th>
    <th>Client</th>
    <th>Amount</th>
    <th>Category</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @payments.each do |payment| %>
  <tr>
    <td><%= payment.commerce_id %></td>
    <td><%= payment.account_id %></td>
    <td><%= payment.amount %></td>
    <td><%= payment.category.name %></td>
    <td><%= link_to 'Show', payment %></td>
    <td><%= link_to 'Edit', edit_payment_path(payment) %></td>
    <td><%= link_to 'Destroy', payment, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Payment', new_payment_path %>
